#pragma once

#include <QMouseEvent>
#include <QPainter>
#include <QPushButton>
#include <QRect>

#include "../StringResource.h"
#include "AIPanelBase.h"
#include "core/ImageMgr.h"
#include "core/StyleMgr.h"

class CAIPanelDataIMSales : public CAIPanelBase {
 public:
  CAIPanelDataIMSales();
  virtual ~CAIPanelDataIMSales();

  virtual void Init();
  void Draw(QPainter* painter, int height);
  void OnBtnOk();
  void paintEvent(QPaintEvent* event) override;
  void SetApplyStatus(int nStatus);
  void CreateButton();
  void resizeEvent(QResizeEvent* event);

 protected:
  SImage* m_imgSuccess;
  SImage* m_imgCaution;
  QRect m_rcButton;
  int m_nStatus;  // 申请状态， 0 = 未申请，1 = 申请通过， 2 = 申请中， 3 =
                  // 申请不通过
  QPushButton* m_btnApply;
};
